/*
 * Copyright (c) 2022 上海市政工程设计研究总院(集团)有限公司 All Rights Reserved.
 */
package com.smedi.ismedi.inmail.core.port.adapter.convert;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.smedi.ismedi.authority.starter.util.VerifyHelper;
import com.smedi.ismedi.constructionproject.api.dto.request.ProjectAssignmentListQueryRequest;
import com.smedi.ismedi.constructionproject.api.dto.request.ProjectCountQueryRequest;
import com.smedi.ismedi.constructionproject.api.dto.request.ProjectListQueryRequest;
import com.smedi.ismedi.constructionproject.api.dto.response.resp.ProjectResp;
import com.smedi.ismedi.dangeroussourcemanage.api.dto.request.DangerSourceListRequest;
import com.smedi.ismedi.dangeroussourcemanage.api.dto.request.DangerSourceTimeLineRequest;
import com.smedi.ismedi.dangeroussourcemanage.api.dto.response.DangerSourceResponse;
import com.smedi.ismedi.file.dto.response.FileInfoResponse;
import com.smedi.ismedi.inmail.api.dto.request.*;
import com.smedi.ismedi.inmail.api.dto.request.appVersion.*;
import com.smedi.ismedi.inmail.api.dto.request.safetyBoard.*;
import com.smedi.ismedi.inmail.api.dto.response.*;
import com.smedi.ismedi.inmail.api.dto.response.safetyBoard.*;
import com.smedi.ismedi.inmail.core.application.command.*;
import com.smedi.ismedi.inmail.core.application.query.vo.*;
import com.smedi.ismedi.inmail.core.domain.aggregatemodel.*;
import com.smedi.ismedi.inmail.core.domain.aggregatemodel.announcement.Announcement;
import com.smedi.ismedi.inmail.core.domain.aggregatemodel.announcement.Receiver;
import com.smedi.ismedi.inmail.core.domain.dto.*;
import com.smedi.ismedi.inmail.core.port.adapter.persistence.model.*;
import com.smedi.ismedi.labor.api.dto.request.LaborListRequest;
import com.smedi.ismedi.labor.api.dto.response.LaborBasicResponse;
import com.smedi.ismedi.majorhazard.api.dto.request.MajorHazardListRequest;
import com.smedi.ismedi.majorhazard.api.dto.request.MajorHazardTimeLineRequest;
import com.smedi.ismedi.majorhazard.api.dto.response.QueryMajorHazardListResponse;
import com.smedi.ismedi.notification.api.dto.request.SendSmsRequest;
import com.smedi.ismedi.organization.api.dto.request.OrganizationListQueryRequest;
import com.smedi.ismedi.organization.api.dto.response.resp.OrganizationResp;
import com.smedi.ismedi.personnel.api.dto.request.OrganizationAssignmentListQueryRequest;
import com.smedi.ismedi.personnel.api.dto.request.PersonListQueryRequest;
import com.smedi.ismedi.personnel.api.dto.response.resp.PersonResp;
import com.smedi.ismedi.safety.education.api.dto.request.SafetyEducationListRequest;
import com.smedi.ismedi.safety.education.api.dto.response.SafetyEducationResponse;
import com.smedi.ismedi.safetycheck.dto.request.check.SafetyCheckListRequest;
import com.smedi.ismedi.safetycheck.dto.request.danger.HiddenDangerListRequest;
import com.smedi.ismedi.safetycheck.dto.response.check.SafetyCheckResponse;
import com.smedi.ismedi.safetycheck.dto.response.danger.HiddenDangerResponse;
import com.smedi.ismedi.video.monitor.api.dto.request.MonitorSettingQueryListRequest;
import com.smedi.ismedi.video.monitor.api.dto.response.MonitorSettingResponse;
import com.smedi.ismedi.web.starter.common.PaginationData;
import org.apache.commons.lang3.StringUtils;
import org.camunda.bpm.engine.task.Comment;
import org.mapstruct.*;

import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

import static com.smedi.ismedi.inmail.core.infrastructure.constant.ConstantField.SEPARATOR;
import static com.smedi.ismedi.inmail.core.infrastructure.constant.ConstantField.ZONE_ID;

/**
 * 维修内容 Infrastructure Converter
 *
 * @author 15428
 * &#064;date  2022-06-07 15:22:03
 * @since 0.0.1
 */
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE, builder = @Builder(disableBuilder = true))
public interface AdapterConverter {

    AnnouncementCreateCommand announcementCreateRequestToAnnouncementCreateCommand(AnnouncementCreateRequest announcementCreateRequest);

    AnnouncementEditCommand announcementEditRequestToAnnouncementEditCommand(AnnouncementEditRequest announcementEditRequest);

    AnnouncementReviewCommand announcementReviewRequestToAnnouncementReviewCommand(AnnouncementReviewRequest announcementReviewRequest);

    AnnouncementDisableCommand announcementDisableRequestToAnnouncementDisableCommand(AnnouncementDisableRequest announcementDisableRequest);

    AnnouncementReadCommand announcementOneQueryRequestToAnnouncementReadCommand(AnnouncementOneQueryRequest announcementOneQueryRequest);

    AnnouncementResponse announcementToAnnouncementResponse(Announcement announcement);

    @Mapping(source = "receiverId", target = "id")
    Receiver announcementReceiverRelationshipEntityToReceiver(AnnouncementReceiverRelationshipEntity announcementReceiverRelationshipEntity);

    @Mapping(source = "attachmentKey", target = "signKey")
    Attachment announcementAttachmentRelationshipEntityToAttachment(AnnouncementAttachmentRelationshipEntity announcementAttachmentRelationshipEntity);

    @Mapping(source = "mobiles", target = "receivers")
    SendSmsRequest sendMessageCommandToSendSmsRequest(MessageSendCommand messageSendCommand);

    List<SendSmsRequest> sendMessageCommandToSendSmsRequest(List<MessageSendCommand> messageSendCommands);

    List<AnnouncementResponse> announcementToAnnouncementResponse(List<Announcement> announcements);

    @Mapping(source = "publisher.id", target = "publisherId")
    @Mapping(source = "reviewer.id", target = "reviewerId")
    @Mapping(source = "task.status", target = "taskStatus")
    @Mapping(source = "task.comment", target = "taskComment")
    @Mapping(source = "task.isPublic", target = "taskPublic")
    AnnouncementEntity announcementToAnnouncementEntity(Announcement announcement);

    AnnouncementRemoveCommand announcementRemoveRequestToAnnouncementRemoveCommand(AnnouncementRemoveRequest announcementRemoveRequest);

    ProcessInstanceStartCommand processInstanceStartRequestToProcessInstanceStartCommand(ProcessInstanceStartRequest processInstanceStartRequest);

    @Named("stringsToString")
    default String stringsToString(List<String> strings) {
        if (VerifyHelper.isNotAvailable(strings)) {
            return null;
        }
        return StringUtils.join(strings, SEPARATOR);
    }

    @Named("stringsToStrings")
    default List<String> stringsToStrings(String string) {
        if (VerifyHelper.isNotAvailable(string)) {
            return new ArrayList<>();
        }
        return new ArrayList<>(Arrays.asList(StringUtils.split(string, SEPARATOR)));
    }

    @Mapping(source = "taskStatus", target = "task.status")
    @Mapping(source = "taskComment", target = "task.comment")
    @Mapping(source = "taskPublic", target = "task.isPublic")
    Announcement announcementEntityToAnnouncement(AnnouncementEntity announcementEntity);

    @Mapping(source = "projectShortName", target = "shortName")
    @Mapping(source = "projectName", target = "fullName")
    @Mapping(source = "hrOrganizationId", target = "organization.id")
    Project projectRespToProject(ProjectResp projectResp);

    default Page<Announcement> announcementEntityToAnnouncement(Page<AnnouncementEntity> announcementEntities, List<Announcement> announcements) {
        return new Page<Announcement>().setRecords(announcements).setTotal(announcementEntities.getTotal()).setCurrent(announcementEntities.getCurrent()).setSize(announcementEntities.getSize());
    }

    NodeResponse nodeToNodeResponse(Node node);

    @Mapping(source = "taskStatus", target = "task.status")
    List<Announcement> announcementEntityToAnnouncement(List<AnnouncementEntity> announcementEntities);

    AnnouncementOneQuery announcementOneQueryRequestToAnnouncementOneQuery(AnnouncementOneQueryRequest announcementOneQueryRequest);

    AnnouncementListQuery announcementListQueryRequestToAnnouncementListQuery(AnnouncementListQueryRequest announcementListQueryRequest);

    AnnouncementPageQuery announcementPageQueryRequestToAnnouncementPageQuery(AnnouncementPageQueryRequest announcementPageQueryRequest);

    Receiver updateReceiverByPerson(@MappingTarget Receiver receiver, Person person);

    Attachment updateAttachmentByFile(@MappingTarget Attachment attachment, Attachment file);

    PersonListQueryRequest personQueryToPersonListQueryRequest(PersonQuery personQuery);

    @Mapping(source = "lastName", target = "name")
    List<Person> personRespToPerson(List<PersonResp> personResps);

    @Mapping(source = "lastName", target = "name")
    Person personRespToPerson(PersonResp personResp);

    OrganizationAssignmentListQueryRequest organizationAssignmentQueryToOrganizationAssignmentListQueryRequest(OrganizationAssignmentQuery organizationAssignmentQuery);

    @Mapping(source = "id", target = "receiverId")
    List<AnnouncementReceiverRelationshipEntity> receiverToAnnouncementReceiverRelationshipEntity(List<Receiver> receivers);

    @Mapping(source = "signKey", target = "attachmentKey")
    List<AnnouncementAttachmentRelationshipEntity> attachmentToAnnouncementAttachmentRelationshipEntity(List<Attachment> attachments);

    OrganizationListQueryRequest organizationQueryToOrganizationListQueryRequest(OrganizationQuery organizationQuery);

    Organization organizationRespToOrganization(OrganizationResp organizationResp);

    Attachment fileInfoResponseToAttachment(FileInfoResponse fileInfoResponse);

    List<Attachment> fileInfoResponseToAttachment(List<FileInfoResponse> fileInfoResponses);

    @Mapping(source = "id", target = "receiverId")
    AnnouncementReceiverRelationshipEntity receiverToAnnouncementReceiverRelationshipEntity(Receiver receiver);

    @Mapping(source = "signKey", target = "attachmentKey")
    AnnouncementAttachmentRelationshipEntity attachmentToAnnouncementAttachmentRelationshipEntity(Attachment attachment);

    @Mapping(source = "urlOut", target = "url")
    AttachmentResponse attachmentToAttachmentResponse(Attachment attachment);

    PaginationData<AnnouncementResponse> announcementPageToAnnouncementResponsePaginationData(Page<Announcement> announcementPage);

    ProcessTaskListCommand processTaskListRequestToProcessTaskListCommand(ProcessTaskListRequest processTaskListRequest);

    @Mapping(source = "time", target = "time", qualifiedByName = "dateToLocalDateTime")
    CommentResponse commentToCommentResponse(Comment comment);

    ProcessTaskResponse processTaskToProcessTaskResponse(ProcessTask processTask);

    List<ProcessTaskResponse> processTaskToProcessTaskResponse(List<ProcessTask> processTasks);

    ProcessInstanceResponse processInstanceToProcessInstanceResponse(ProcessInstance processInstance);

    ProcessTaskCompleteCommand processTaskCompleteRequestToProcessTaskCompleteCommand(ProcessTaskCompleteRequest processTaskCompleteRequest);

    ProcessInstanceCloseCommand processInstanceCloseRequestToProcessInstanceCloseCommand(ProcessInstanceCloseRequest processInstanceCloseRequest);

    ProcessTaskCancelCommand processTaskCancelRequestToProcessTaskCancelCommand(ProcessTaskCancelRequest processTaskCancelRequest);

    AnnouncementReadRecordCommand announcementReadRecordRequestToAnnouncementReadRecordCommand(AnnouncementReadRecordRequest announcementReadRecordRequest);

    ReadRecordOneQueryCommand readRecordOneQueryRequestToReadRecordOneQueryCommand(ReadRecordOneQueryRequest readRecordOneQueryRequest);

    ReadRecordResponse readRecordToReadRecordResponse(ReadRecord readRecord);

    @Named("dateToLocalDateTime")
    default LocalDateTime dateToLocalDateTime(Date date) {
        if (null == date) {
            return null;
        }
        return LocalDateTime.ofInstant(date.toInstant(), ZoneId.of(ZONE_ID));
    }

    DingDeptUserEntity dingDeptUserSaveCommandToDingDeptUserEntity(DingDeptUserSaveCommand dingDeptUserSaveCommand);

    ReadRecordAllZipQueryCommand readRecordAllZipRequestToReadRecordAllZipQueryCommand(ReadRecordAllZipRequest readRecordAllZipRequest);

    ProjectOverviewPageCommand projectOverviewPageRequestToProjectOverviewPageCommand(ProjectOverviewPageRequest projectOverviewPageRequest);

    ProjectOverviewListCommand projectOverviewListRequestToProjectOverviewListCommand(ProjectOverviewListRequest projectOverviewListRequest);

    PaginationData<ProjectOverviewResponse> projectOverviewPageToProjectOverviewResponsePaginationData(Page<ProjectOverviewVo> projectOverviewPage);

    ProjectOverviewPaginationData projectOverviewPageVoToProjectOverviewPaginationData(ProjectOverviewPageVo projectOverviewPageVo);

    SafetyCheckOrganizationOverviewPageCommand safetyCheckOverviewPageRequestToSafetyCheckOverviewPageCommand(SafetyCheckOrganizationOverviewPageRequest safetyCheckOrganizationOverviewPageRequest);

    SafetyCheckOrganizationOverviewListCommand safetyCheckOverviewListRequestToSafetyCheckOverviewListCommand(SafetyCheckOrganizationOverviewListRequest safetyCheckOrganizationOverviewListRequest);

    PaginationData<SafetyCheckOrganizationOverviewResponse> safetyCheckOverviewPageToSafetyCheckOverviewResponsePaginationData(Page<SafetyCheckOrganizationOverviewVo> safetyCheckOverviewPage);

    SafetyCheckOrgOverviewPaginationData safetyCheckOrgOverviewPageVoToSafetyCheckOrgOverviewPaginationData(SafetyCheckOrgOverviewPageVo safetyCheckOrgOverviewPageVo);

    VideoMonitorOrganizationOverviewPageCommand videoMonitorOrganizationOverviewPageRequestToVideoMonitorOrganizationOverviewPageCommand(VideoMonitorOrganizationOverviewPageRequest videoMonitorOrganizationOverviewPageRequest);

    VideoMonitorOrganizationOverviewListCommand videoMonitorOrganizationOverviewListRequestToVideoMonitorOrganizationOverviewListCommand(VideoMonitorOrganizationOverviewListRequest videoMonitorOrganizationOverviewListRequest);

    PaginationData<VideoMonitorOrganizationOverviewResponse> videoMonitorOrganizationOverviewPageToVideoMonitorOrganizationOverviewResponsePaginationData(Page<VideoMonitorOrganizationOverviewVo> videoMonitorOverviewPage);

    VideoMonitorOrgOverviewPaginationData videoMonitorOrgOverviewPageVoToVideoMonitorOrgOverviewPaginationData(VideoMonitorOrgOverviewPageVo videoMonitorOrgOverviewPageVo);

    AttendanceOverviewPageCommand attendanceOverviewPageRequestToAttendanceOverviewPageCommand(AttendanceOverviewPageRequest attendanceOverviewPageRequest);

    AttendanceOverviewListCommand attendanceOverviewListRequestToAttendanceOverviewListCommand(AttendanceOverviewListRequest attendanceOverviewListRequest);

    PaginationData<AttendanceOverviewResponse> attendanceOverviewPageToAttendanceOverviewResponsePaginationData(Page<AttendanceOverviewVo> attendanceOverviewPage);

    ProjectListQueryRequest projectQueryToProjectListQueryRequest(ProjectQuery projectQuery);

    ProjectOverviewListCommand projectOverviewPageCommandToProjectOverviewListCommand(ProjectOverviewPageCommand projectOverviewPageCommand);

    SafetyCheckProjectOverviewPageCommand safetyCheckProjectOverviewPageRequestToSafetyCheckProjectOverviewPageCommand(SafetyCheckProjectOverviewPageRequest safetyCheckProjectOverviewPageRequest);

    PaginationData<SafetyCheckProjectOverviewResponse> safetyCheckProjectOverviewPageToSafetyCheckProjectOverviewResponsePaginationData(Page<SafetyCheckProjectOverviewVo> safetyCheckProjectOverviewPage);

    SafetyCheckProjectOverviewListCommand safetyCheckProjectOverviewListRequestToSafetyCheckProjectOverviewListCommand(SafetyCheckProjectOverviewListRequest safetyCheckProjectOverviewListRequest);

    VideoMonitorProjectOverviewPageCommand videoMonitorProjectOverviewPageRequestToVideoMonitorProjectOverviewPageCommand(VideoMonitorProjectOverviewPageRequest videoMonitorProjectOverviewPageRequest);

    VideoMonitorProjectOverviewListCommand videoMonitorProjectOverviewListRequestToVideoMonitorProjectOverviewListCommand(VideoMonitorProjectOverviewListRequest videoMonitorProjectOverviewListRequest);

    PaginationData<VideoMonitorProjectOverviewResponse> videoMonitorProjectOverviewPageToVideoMonitorProjectOverviewResponsePaginationData(Page<VideoMonitorProjectOverviewVo> videoMonitorOverviewPage);

    SafetyCheckListRequest safetyCheckQueryToSafetyCheckRequest(SafetyCheckQuery safetyCheckQuery);

    @Mapping(source = "safetyCheckTypeTwo", target = "safetyCheckQuality")
    SafetyCheckVo safetyCheckResponseToSafetyCheck(SafetyCheckResponse safetyCheckResponse);

    List<SafetyCheckVo> safetyCheckResponseToSafetyCheck(List<SafetyCheckResponse> safetyCheckResponse);

    SafetyCheckOrganizationOverviewListCommand safetyCheckOrganizationOverviewPageCommandToSafetyCheckOrganizationOverviewListCommand(SafetyCheckOrganizationOverviewPageCommand safetyCheckOrganizationOverviewPageCommand);

    HiddenDangerListRequest hiddenDangerQueryToHiddenDangerListRequest(HiddenDangerQuery HiddenDangerQuery);

    HiddenDangerVo hiddenDangerResponseToHiddenDanger(HiddenDangerResponse hiddenDangerResponse);

    List<HiddenDangerVo> hiddenDangerResponseToHiddenDanger(List<HiddenDangerResponse> hiddenDangerResponses);

    SafetyCheckProjectOverviewListCommand safetyCheckProjectOverviewPageCommandToSafetyCheckProjectOverviewListCommand(SafetyCheckProjectOverviewPageCommand safetyCheckProjectOverviewPageCommand);

    MonitorSettingQueryListRequest videoMonitorQueryToMonitorSettingQueryListRequest(VideoMonitorQuery videoMonitorQuery);

    VideoMonitor monitorSettingResponseToMonitorSetting(MonitorSettingResponse monitorSettingResponse);

    List<VideoMonitor> monitorSettingResponseToMonitorSetting(List<MonitorSettingResponse> monitorSettingResponse);

    VideoMonitorOrganizationOverviewListCommand videoMonitorOrganizationOverviewPageCommandToVideoMonitorOrganizationOverviewListCommand(VideoMonitorOrganizationOverviewPageCommand videoMonitorOrganizationOverviewPageCommand);

    VideoMonitorProjectOverviewListCommand videoMonitorProjectOverviewPageCommandToVideoMonitorProjectOverviewListCommand(VideoMonitorProjectOverviewPageCommand videoMonitorProjectOverviewPageCommand);

    SafetyBoardOverviewResponse safetyBoardOverviewVoToSafetyBoardOverviewResponse(SafetyBoardOverviewVo safetyBoardOverviewVo);

    SafetyEducationListRequest safetyEducationQueryToSafetyEducationListRequest(SafetyEducationQuery safetyEducationQuery);

    SafetyEducationVo safetyEducationResponseToSafetyEducation(SafetyEducationResponse safetyEducationResponse);

    List<SafetyEducationVo> safetyEducationResponseToSafetyEducation(List<SafetyEducationResponse> safetyEducationResponses);

    LaborListRequest laborQueryToLaborListRequest(LaborQuery laborQuery);

    Labor laborBasicResponseToLabor(LaborBasicResponse laborBasicResponse);

    List<Labor> laborBasicResponseToLabor(List<LaborBasicResponse> laborBasicResponse);

    MajorHazardTodayPageCommand majorHazardTodayPageRequestToMajorHazardTodayPageCommand(MajorHazardTodayPageRequest majorHazardTodayPageRequest);

    DangerSourceTodayPageCommand dangerSourceTodayPageRequestToDangerSourceTodayPageCommand(DangerSourceTodayPageRequest dangerSourceTodayPageRequest);

    HiddenDangerInstituteStatisticsCommand hiddenDangerStatisticsRequestToHiddenDangerStatisticsCommand(HiddenDangerInstituteStatisticsRequest hiddenDangerInstituteStatisticsRequest);

    HiddenDangerStatisticsCommand hiddenDangerStatisticsRequestToHiddenDangerStatisticsCommand(HiddenDangerStatisticsRequest hiddenDangerStatisticsRequest);

    HiddenDangerOrganizationStatisticsCommand hiddenDangerStatisticsRequestToHiddenDangerStatisticsCommand(HiddenDangerOrganizationStatisticsRequest hiddenDangerOrganizationStatisticsRequest);

    DangerSourceListRequest dangerSourceQueryToDangerSourceListRequest(DangerSourceQuery dangerSourceQuery);

    List<DangerSourceVo> dangerSourceResponseToDangerSource(List<DangerSourceResponse> dangerSourceResponses);

    MajorHazardListRequest majorHazardQueryToMajorHazardListRequest(MajorHazardQuery majorHazardQuery);

    MajorHazardTimeLineRequest timeLineQueryToMajorHazardTimeLineRequest(TimeLineQuery timeLineQuery);

    DangerSourceTimeLineRequest timeLineQueryToDangerSourceTimeLineRequest(TimeLineQuery timeLineQuery);


    @Mapping(source = "majorHazardName", target = "name")
    MajorHazardVo majorHazardResponseToMajorHazard(QueryMajorHazardListResponse majorHazardResponse);

    List<MajorHazardVo> majorHazardResponseToMajorHazard(List<QueryMajorHazardListResponse> majorHazardResponses);

    LaborStatisticsResponse laborStatisticsVoToLaborStatisticsResponse(LaborStatisticsVo laborStatisticsVo);

    HiddenDangerStatisticsResponse hiddenDangerStatisticsVoToHiddenDangerStatisticsResponse(HiddenDangerStatisticsVo hiddenDangerStatisticsVo);

    MajorHazardPaginationData majorHazardPageVoToMajorHazardPaginationData(MajorHazardPageVo majorHazardPageVo);

    DangerSourcePaginationData dangerSourcePageVoToDangerSourcePaginationData(DangerSourcePageVo dangerSourcePageVo);

    SafetyCheckProjectStatisticsCommand safetyCheckStatisticsProjectRequestToSafetyCheckStatisticsProjectCommand(SafetyCheckStatisticsProjectRequest safetyCheckStatisticsProjectRequest);

    List<SafetyCheckProjectStatisticsResponse> safetyCheckStatisticsInProjectVoToSafetyCheckStatisticsInProjectResponse(List<SafetyCheckProjectStatisticsVo> safetyCheckProjectStatisticsVos);

    HiddenDangerProjectStatisticsCommand hiddenDangerStatisticsProjectRequestToHiddenDangerStatisticsProjectCommand(HiddenDangerStatisticsProjectRequest hiddenDangerStatisticsProjectRequest);

    List<HiddenDangerProjectStatisticsResponse> hiddenDangerStatisticsInProjectVoToHiddenDangerStatisticsInProjectResponse(List<HiddenDangerProjectStatisticsVo> hiddenDangerProjectStatisticsVos);

    SafetyEducationProjectStatisticsCommand safetyEducationStatisticsProjectRequestToSafetyEducationStatisticsProjectCommand(SafetyEducationStatisticsProjectRequest safetyEducationStatisticsProjectRequest);

    List<SafetyEducationProjectStatisticsResponse> safetyEducationStatisticsInProjectVoToSafetyEducationStatisticsInProjectResponse(List<SafetyEducationProjectStatisticsVo> safetyEducationProjectStatisticsVos);

    ProjectStatisticsResponse projectStatisticsVoToProjectStatisticsResponse(ProjectStatisticsVo projectStatisticsVo);

    SafetyCheckInstituteStatisticsCommand safetyCheckInstituteStatisticsRequestToSafetyCheckStatisticsCommand(SafetyCheckInstituteStatisticsRequest safetyCheckInstituteStatisticsRequest);

    SafetyCheckOrganizationStatisticsCommand safetyCheckOrganizationStatisticsRequestToSafetyCheckStatisticsCommand(SafetyCheckOrganizationStatisticsRequest safetyCheckOrganizationStatisticsRequest);

    List<StatisticsNodeResponse> statisticsNodeVoToStatisticsNodeResponse(List<StatisticsNodeVo> statisticsNodeVos);

    HiddenDangerInstituteStatisticsCommand hiddenDangerInstituteStatisticsRequestToHiddenDangerStatisticsCommand(HiddenDangerInstituteStatisticsRequest hiddenDangerInstituteStatisticsRequest);

    HiddenDangerOrganizationStatisticsCommand hiddenDangerOrganizationStatisticsRequestToHiddenDangerStatisticsCommand(HiddenDangerOrganizationStatisticsRequest hiddenDangerOrganizationStatisticsRequest);

    DingAttendanceOverViewPageCommand dingAttendanceOverViewPageRequestToDingAttendanceOverViewPageCommand(DingAttendanceOverViewPageRequest dingAttendanceOverViewPageRequest);

    PaginationData<DingAttendanceOverViewResponse> dingAttendanceOverViewVoPageToDingAttendanceOverViewResponsePaginationData(Page<DingAttendanceOverViewVo> dingAttendanceOverViewVoPage);

    DingAttendanceProjectOverViewPageCommand dingAttendanceProjectOverViewPageRequestToDingAttendanceProjectOverViewPageCommand(DingAttendanceProjectOverViewPageRequest dingAttendanceProjectOverViewPageRequest);

    PaginationData<DingAttendanceProjectOverViewResponse> dingAttendanceProjectOverViewVoPageToDingAttendanceProjectOverViewResponsePaginationData(Page<DingAttendanceProjectOverViewVo> dingAttendanceProjectOverViewVoPage);

    PaginationData<DingDingAttendanceProjectDetailResponse> dingAttendanceProjectOverViewVoPageToDingAttendanceProjectDetailPageResponsePaginationData(Page<DingAttendanceProjectOverViewVo> dingAttendanceProjectOverViewVoPage);


    PaginationData<DingDingAttendancePeopleDetailResponse> dingAttendancePeopleOverViewVoPageToDingAttendancePeopleDetailPageResponsePaginationData(Page<DingPeopleDetailOverViewVo> dingPeopleDetailOverViewVoPage);


    DingDingAttendanceProjectResponse dingDingAttendanceProjectVoToDingDingAttendanceProjectResponse(DingDingAttendanceProjectVo dingDingAttendanceProjectVo);

    List<DingDeptUser> dingDeptUserEntityToDingDeptUser(List<DingDeptUserEntity> entities);

    DingAttendanceOverViewPageCommand dingAttendanceOrgExportToDingAttendanceOverViewPageCommand(DingAttendanceOrgExportRequest request);

    DingAttendanceProjectOverViewPageCommand dingAttendanceProjectExportRequestToDingAttendanceProjectOverViewPageCommand(DingAttendanceProjectExportRequest request);

    DingProjectDetailPageCommand dingProjectDetailRequestToDingProjectDetailPageCommand(DingProjectDetailPageRequest request);

    UserActionLogPageCommand userActionLogPageRequestToUserActionLogPageCommand(UserActionLogPageRequest request);

    PaginationData<UserActionLogResponse> userActionLogPageToUserActionLogResponsePaginationData(Page<UserActionLogVo> page);

    UserActionLog userActionRequestToUserActionLog(UserActionLogRequest request);

    ProcessAttachment processAttachmentEntityToProcessAttachment(ProcessAttachmentEntity processAttachmentEntity);

    List<ProcessAttachment> processAttachmentEntityToProcessAttachment(List<ProcessAttachmentEntity> processAttachmentEntity);

    ProcessComment processCommentEntityToProcessComment(ProcessCommentEntity processCommentEntity);

    List<ProcessComment> processCommentEntityToProcessComment(List<ProcessCommentEntity> processCommentEntity);

    ProcessVariable processVariableEntityToProcessVariable(ProcessVariableEntity processVariableEntity);

    List<ProcessVariable> processVariableEntityToProcessVariable(List<ProcessVariableEntity> processVariableEntity);

    AnnouncementExportCommand announcementExportRequestToAnnouncementExportCommand(AnnouncementExportRequest announcementExportRequest);

    AnnouncementListQuery announcementExportRequestToAnnouncementListQuery(AnnouncementExportRequest announcementExportRequest);

    ProjectStatisticsByRegionResponse projectStatisticsByRegionVoToProjectStatisticsByRegionResponse(ProjectStatisticsByRegionVo projectStatisticsByRegionVo);

    ProjectCountQueryRequest projectQueryToProjectCountQueryRequest(ProjectQuery projectQuery);

    LoginLogLoginCommand loginLogLoginRequestToLoginLogLoginCommand(LoginLogLoginRequest loginLogLoginRequest);

    LoginLogPageCommand loginLogPageRequestToLoginLogPageCommand(LoginLogPageRequest loginLogPageRequest);

    @Mapping(source = "loginUser.id", target = "loginUserId")
    LoginLogEntity loginLogToLoginLogEntity(LoginLog loginLog);

    LoginLogLogoutCommand loginLogLogoutRequestToLoginLogLogoutCommand(LoginLogLogoutRequest loginLogLogoutRequest);

    OperationLogCreateCommand operationLogCreateRequestToOperationLogCreateCommand(OperationLogCreateRequest operationLogCreateRequest);

    @Mapping(source = "loginLog.id", target = "loginLogId")
    OperationLogEntity operationLogToOperationLogEntity(OperationLog operationLog);

    DownloadFileToZipCommand downloadFileToZipRequestToDownloadFileToZipCommand(DownloadFileToZipRequest downloadFileToZipRequest);

    FileResponse fileInfoResponseToFileResponse(FileInfoResponse fileInfoResponse);

    LoginLogUserStaticsPageCommand loginLogUserStaticsPageRequestToLoginLogUserStaticsPageCommand(LoginLogUserStaticsPageRequest loginLogUserStaticsPageRequest);

    LoginLogOrgStaticsPageCommand loginLogOrgStaticsPageRequestToLoginLogOrgStaticsPageCommand(LoginLogOrgStaticsPageRequest loginLogOrgStaticsPageRequest);

    PaginationData<LoginLogUserStaticsResponse> loginLogUserStaticsPageToLoginLogUserStaticsResponsePaginationData(Page<LoginLogUserStatics> loginLogUserStaticsPage);

    PaginationData<LoginLogOrgStaticsResponse> loginLogOrgStaticsPageToLoginLogOrgStaticsResponsePaginationData(Page<LoginLogOrgStatics> loginLogOrgStaticsPage);

    PaginationData<LoginLogResponse> loginLogPageToLoginLogResponsePaginationData(Page<LoginLog> loginLogPage);

    LoginLogUserStaticsListCommand loginLogUserStaticsExportRequestToLoginLogUserStaticsListCommand(LoginLogUserStaticsExportRequest loginLogUserStaticsExportRequest);

    LoginLogOrgStaticsListCommand loginLogOrgStaticsExportRequestToLoginLogOrgStaticsListCommand(LoginLogOrgStaticsExportRequest loginLogOrgStaticsExportRequest);

    AppVersionCreateCommand appVersionCreateRequestToAppVersionCreateCommand(AppVersionCreateRequest appVersionCreateRequest);

    AppVersionUpdateCommand appVersionUpdateRequestToAppVersionUpdateCommand(AppVersionUpdateRequest appVersionUpdateRequest);

    AppVersionRemoveCommand appVersionRemoveRequestToAppVersionRemoveCommand(AppVersionRemoveRequest appVersionRemoveRequest);

    AppVersionEntity appVersionToAppVersionEntity(AppVersion appVersion);

    AppVersion appVersionEntityToAppVersion(AppVersionEntity appVersionEntity);

    List<AppVersion> appVersionEntityToAppVersion(List<AppVersionEntity> appVersionEntity);

    AppVersionEnableCommand appVersionEnableRequestToAppVersionEnableCommand(AppVersionEnableRequest appVersionEnableRequest);

    AppVersionDisableCommand appVersionDisableRequestToAppVersionDisableCommand(AppVersionDisableRequest appVersionDisableRequest);

    AppVersionQuery appVersionGetRequestToAppVersionQuery(AppVersionGetRequest appVersionGetRequest);

    AppVersionQuery appVersionListRequestToAppVersionQuery(AppVersionListRequest appVersionListRequest);

    AppVersionQuery appVersionPageRequestToAppVersionQuery(AppVersionPageRequest appVersionPageRequest);

    AppVersionCheckVersionCmd developmentCheckVersionRequestToDevelopmentCheckVersionCmd(AppVersionCheckVersionRequest appVersionCheckVersionRequest);

    AppVersionResponse appVersionToAppVersionResponse(AppVersion appVersion);

    CheckVersionResponse appVersionToAppVersionResponse(CheckVersionVo appVersion);

    List<AppVersionResponse> appVersionToAppVersionResponse(List<AppVersion> appVersion);

    PaginationData<AppVersionResponse> appVersionToAppVersionResponse(Page<AppVersion> videoMonitorOverviewPage);

    Page<AppVersion> appVersionEntityToAppVersion(Page<AppVersionEntity> page);

    PaginationData<ProjectPersonOverViewResponse> pageToPaginationData(Page<ProjectPersonOverViewVo> page);

    PaginationData<ProjectPostOverViewResponse> postPageToPaginationData(Page<ProjectPostOverViewVo> page);

    ProjectAssignmentListQueryRequest queryToRequest(ProjectAssignmentListQuery projectAssignmentListQuery);

    List<ProjectJobPersonResponse> projectJobPersonVoToProjectJobPersonResponse(List<ProjectJobPersonVo> projectJobPersonVos);

    ProjectPostPersonOverViewResponse projectPostPersonVoToProjectPostPersonResponse(ProjectPostPersonOverViewVo projectJobPersonVos);

}
